package com.sxyc.weixin.controller;

import java.util.Date;

import com.alibaba.fastjson.JSONObject;
import com.jfinal.core.Controller;
import com.sxyc.tintin.model.XnNet;

public class DDangController extends Controller{

	public void index(){
		String address=getPara("address");
		String tel=getPara("tel");
		String name=getPara("name");
		boolean flag=new XnNet().set("Address",address).set("tel",tel).set("name",name).set("Tel", new Date()).save();
		int code;
		if(flag){
			code=200;
		}else
			code=500;
		JSONObject jo=new JSONObject();
		jo.put("code", code);
		renderJson(jo.toString());
	}
}
